<template>
  <a-modal
    title="密码修改"
    :width="640"
    :visible="visible"
    :confirmLoading="loading"
    @ok="() => {$emit('ok')}"
    @cancel="() => {$emit('cancel')}"
  >
    <a-spin :spinning="loading">
      <a-form :form="form" :labelCol="{ sm: { span: 4 } }" :wrapperCol="{ sm: { span: 20 } }">
        <a-form-item label="旧密码">
          <a-input
            v-decorator="['oldPassword', { rules: [{ required: true, message: '旧密码不能为空' }] }]"
          />
        </a-form-item>
        <a-form-item label="新密码">
          <a-input
            v-decorator="['newPassword', { rules: [{ required: true, message: '新密码不能为空' }] }]"
          />
        </a-form-item>
      </a-form>
    </a-spin>
  </a-modal>
</template>

<script>
import pick from 'lodash.pick'
import { invoiceListByNoAuth } from '@/api/noAuth'
// 子公司列表   // 外包列表     // 工作室列表 // 客户列表
// 表单字段
const fields = ['id', 'name', 'bankName', 'bankNum', 'number', 'address', 'phone', 'type']//, 
export default {
  props: {
    visible: {
      type: Boolean,
      required: true,
    },
    loading: {
      type: Boolean,
      default: () => false,
    },
  },
  data() {
    return {
      form: this.$form.createForm(this),
    }
  },
  created() {
    
    // 防止表单未注册
    fields.forEach((v) => this.form.getFieldDecorator(v))
  },
  methods: { }
}
</script>
